package com.paulianer.stuff;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

import com.paulianer.interfaces.UDP_Packet;

public class SEND_UDP {
	private static boolean udp2net(UDP_Packet out) throws IOException {
		InetAddress address = InetAddress.getByName(out.getIP());
        DatagramPacket packet = new DatagramPacket(out.getCONTENT(), 102, address, out.getPort());
        DatagramSocket socket = new DatagramSocket();
        socket.send(packet);
        socket.close();
		
		return true;
	}
}
